
var mongoose = require('mongoose')
var Schema = mongoose.Schema

var rightsSchema = new Schema({
    id: {
        type: Number,
        required: true
    },
    rightsName: {
        type: String,
        required: true
    },
    children:[{
        id: {
            type: Number,
            required: true
        },
        rightsName: {
            type: String,
            required: true
        }
    }]
})

module.exports = mongoose.model('Right', rightsSchema)